<template>
  <div class="all">
    <nuxt/>
    <tav-nav/>
  </div>
</template>
<script>
  import TavNav from '../components/common/tabNav'
  import { mapGetters, mapActions } from 'Vuex'

  const Cookie = process.browser ? require('js-cookie') : undefined
  export default {
    components: { TavNav },
    computed: {
      ...mapGetters([
        'sid',
        'user'
      ])
    },
    mounted() {
      // 自动登录后保存 token
      if (this.sid) {
        Cookie.set('sid', this.sid)
      }
      if (this.user) {
        Cookie.set('user', this.user)
      }
    }
  }
</script>
<style>
  html {
    font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "STHeitiSC-Light", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    word-spacing: 1px;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
  }

  body,
  html {
    width: 100%;
    height: 100%;
  }

  div::-webkit-scrollbar {
    display: none;
  }

  input, textarea {
    -webkit-user-select: auto !important;
    -khtml-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    -o-user-select: auto !important;
    user-select: auto !important;
  }

  #__nuxt,
  #__layout,
  *:before,
  *:after {
    box-sizing: border-box;
    margin: 0;
    width: 100%;
    height: 100%;
    border: 0;
    -webkit-user-select: none;
  }

  div {
    box-sizing: border-box;
  }

  .all {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    background-color: rgba(245, 246, 247, 1);
    position: relative;
  }

  .swiper-pagination-bullet {
    width: 24px !important;
    height: 4px !important;
    border-radius: 0 !important;
  }

  .swiper-pagination-bullet-active {
    background-color: #E8E9E9;
  }

  .mint-msgbox {
    border-radius: 24px;
  }

  .mint-msgbox-content {
    height: 160px;
  }

  .mint-msgbox-btns {
    height: 100px;
  }
  .mint-msgbox-cancel {
    color: #FF6478;
  }
</style>

